package org.elec.mac.service;


import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import org.elec.mac.mapper.SMachineMenuMapper;
import org.elec.mac.entity.SMachineMenu;

import java.util.List;
import java.util.Map;

/**
 * @author
 * @version 1.0
 * @Description:实现类
 * @created
 */
@Service
public class SMachineMenuService extends BaseService<SMachineMenu, SMachineMenuMapper> implements InitializingBean {

    @Autowired
    private SMachineMenuMapper sMachineMenuMapper;

    public void afterPropertiesSet() throws Exception {
        this.setBaseMapper(sMachineMenuMapper);
    }

    /**
     * 关联查询
     *
     * @param param
     * @return
     */
    public List<Map<String, Object>> getMachineMenuList(Map<String, Object> param) {
        return sMachineMenuMapper.getMachineMenuList(param);
    }

    /**
     * 获取菜单中其他产品所需要的原料
     * @param param
     * @return
     */
    public List<Long> getOtherMaterialIDList(Map<String, Object> param) {
        return sMachineMenuMapper.getOtherMaterialIDList(param);
    }

}
